package S

import rx.Observable
import rx.schedulers.Schedulers
import java.util.concurrent.TimeUnit


fun main(args: Array<String>) {

    /**
     * skip 根据time规则丢弃前面一段时间内的事件
     */
    Observable
            .interval(1, TimeUnit.SECONDS, Schedulers.immediate())
            .skip(5, TimeUnit.SECONDS)
            .skip(3,TimeUnit.SECONDS)
            .subscribe({
                println(it)
            })
}